home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Game-Installer / WHD_Installers / Games_J-M / Moonstone Install / Install next >
Text File  |  1977-12-31  |  4KB  |  183 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "data")        ;sub directory containing data files
  4. (set #readme-file "README")    ;name of readme file
  5.  
  6. ;****************************
  7.  
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  19.   )
  20. )
  21.  
  22. ;****************************
  23.  
  24. (if
  25.   (exists #readme-file)
  26.   (if
  27.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  28.     ("")
  29.     (run ("SYS:Utilities/More %s" #readme-file))
  30.   )
  31. )
  32.  
  33. (set #program "WHDLoad")
  34. (P_chkrun)
  35.  
  36. (set @default-dest
  37.   (askdir
  38.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  39.     (help @askdir-help)
  40.     (default @default-dest)
  41.     (disk)
  42.   )
  43. )
  44. (set #dest (tackon @default-dest @app-name))
  45. (if
  46.   (exists #dest)
  47.   (
  48.     (set #choice
  49.       (askbool
  50.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  51.         (default 1)
  52.         (choices "Delete" "Skip")
  53.         (help @askbool-help)
  54.       )
  55.     )
  56.     (if
  57.       (= #choice 1)
  58.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  59.     )
  60.   )
  61. )
  62. (makedir #dest
  63.   (help @makedir-help)
  64.   (infos)
  65. )
  66.  
  67. ;----------------------------
  68.  
  69. (copyfiles
  70.   (help @copyfiles-help)
  71.   (source ("%s.Slave" @app-name))
  72.   (dest #dest)
  73. )
  74. (if
  75.   (exists ("%s.newicon" @app-name))
  76.   (set #icon
  77.     (askchoice
  78.       (prompt "\nWhich icon do you like to install ?\n")
  79.       (default 0)
  80.       (choices "Normal" "NewIcon")
  81.       (help @askchoice-help)
  82.     )
  83.   )
  84.   (set #icon 0)
  85. )
  86. (select #icon
  87.   (set #icon ("%s.inf" @app-name))
  88.   (set #icon ("%s.newicon" @app-name))
  89. )
  90. (copyfiles
  91.   (help @copyfiles-help)
  92.   (source #icon)
  93.   (newname ("%s.info" @app-name))
  94.   (dest #dest)
  95. )
  96. (if
  97.   (exists #readme-file)
  98.   (copyfiles
  99.     (help @copyfiles-help)
  100.     (source #readme-file)
  101.     (dest #dest)
  102.   )
  103. )
  104. (if
  105.   (exists ("%s.info" #readme-file))
  106.   (copyfiles
  107.     (help @copyfiles-help)
  108.     (source ("%s.info" #readme-file))
  109.     (dest #dest)
  110.   )
  111. )
  112. (if
  113.   (= #sub-dir "")
  114.   ("")
  115.   (
  116.     (set #dest (tackon #dest #sub-dir))
  117.     (makedir #dest
  118.       (help @makedir-help)
  119.     )
  120.   )
  121. )
  122.  
  123. ;----------------------------
  124.  
  125. (until
  126.   (exists " :nb" (noreq))
  127.   (message
  128.     "\n"
  129.     "Insert Moonstone Disk A in any drive!\n"
  130.     "\n"
  131.     "Make sure that no other Moonstone disk is inserted in another drive!"
  132.     (all)
  133.   )
  134. )
  135. (copyfiles
  136.   (help @copyfiles-help)
  137.   (source " :")
  138.   (dest #dest)
  139.   (pattern "~(s|kn1.ob|nb)")
  140. )
  141.  
  142. (until
  143.   (exists " :mi.c" (noreq))
  144.   (message
  145.     "\n"
  146.     "Insert Moonstone Disk B in any drive!\n"
  147.     "\n"
  148.     "Make sure that no other Moonstone disk is inserted in another drive!"
  149.     (all)
  150.   )
  151. )
  152. (copyfiles
  153.   (help @copyfiles-help)
  154.   (source " :")
  155.   (dest #dest)
  156.   (choices "HE1.ob" "HE2.ob" "HE3.ob" "KN1.ob" "KN2.ob" "KN3.ob" "KN4.ob"
  157.   "RATMEN1.CEL" "RATMEN2.CEL" "Ra.a" "Small.font" "TROGGAxe1.CEL"
  158.   "TROGGAxe2.CEL" "TROGGSpear1.CEL" "TROGGSpear2.CEL" "TROLL1.CEL"
  159.   "TROLL2.CEL" "blo.cel" "ch.piv" "collide.hit" "ki.cel" "kn.a" "mi.c"
  160.   "po.cel" "re.a" "sel.cel" "test" "to.a" "tr.a" "wn.a")
  161. )
  162.  
  163. (until
  164.   (exists " :ba.a" (noreq))
  165.   (message
  166.     "\n"
  167.     "Insert Moonstone Disk C in any drive!\n"
  168.     "\n"
  169.     "Make sure that no other Moonstone disk is inserted in another drive!"
  170.     (all)
  171.   )
  172. )
  173. (copyfiles
  174.   (help @copyfiles-help)
  175.   (source " :")
  176.   (dest #dest)
  177.   (all)
  178. )
  179.  
  180. ;----------------------------
  181.  
  182. (exit)
  183.